<?php
	session_start();
	require_once("../db_connect.php");

	//ボランティア情報複数削除

	//$submit = $_POST['submit'];

	//if(!empty($submit)){

		$volunteer_delete  = $_POST['volunteer_delete'];

		for($i=0;$i<count($volunteer_delete);$i++){

			$sql = "DELETE FROM volunteer_information WHERE volunteer_information_id = ?";
			$stmt = $db->prepare($sql);
			$ary = (htmlspecialchars($volunteer_delete[$i],ENT_QUOTES,"UTF-8"));

			$db->execute($stmt, $ary);     //UPDATE文を実行

			if (PEAR::isError($db)) {       //SQLの実行に失敗すればここでエラー文を出力
		    	die($res->getMessage());
			}

		}

	header("Location: manage_volunteer.php");

	//}
?>